#! /usr/bin/python3
# coding=utf-8
# @time: 2025/10/23 19:30
# @Author:鹤川
import time

from selenium.webdriver.common.by import By

from pages.basePage import BasePage
from pages.msgPage import MsgPage
from pages.orderPage import OrderPage


#我的个人信息页面
class MyInfoPage(BasePage):
    myAccount = (By.XPATH,"//*[@class='userMenu']/a[6]")
    dd = (By.XPATH, "//*[@class='userMenu']/a[3]")

    #属性  我的留言
    # 方法： 进入我的留言页面
    def go_to_myMSGPage(self):
        myInfo = self.findEle(self.myAccount)
        self.eleClick(myInfo)
        return MsgPage(self.driver)
        #点击我的留言菜单
        #返回留言页面的类对象

    def go_To_OrderPage(self):
        myOrder = self.findEle(self.dd)
        self.eleClick(myOrder)
        return OrderPage(self.driver)

if __name__ == '__main__':
    from pages.indexPage import IndexPage
    indexPage = IndexPage()
    my = indexPage.go_to_myInfoPage()
    my.go_To_OrderPage()
